This invention relates to an improved programmable logic controller provided with a microprocessor.
Heretofore a programmable logic controller (PLC) has been fabricated with IC and MSI. More particularly, it has been constructed such that it can efficiently execute a sequence function among various functions of a minicomputer fabricated with IC and MSI, can reduce unnecessary functions and reduce the number of ICs and MSIs. As a result of recent developments in the art of electronics, there have been proposed microprocessors formed using large scale integration (LSI) techniques which have a higher reliability and provide many more functions. A microprocessor has functions comparable with those of a minicomputer but has a somewhat lower operating speed. Accordingly, if it were possible to incorporate a microprocessor into a PLC, it would be advantageous from the standpoint of price and reliability although some of the functions of the microprocessor are unnecessary.
However, since the microprocessor is constructed such that it can realize the functions of a minicomputer, if it were used as it is, it would be extremely difficult to efficiently execute a programmable logic sequence of instructions for the following reasons:
(1) Although logical AND and logical OR operations of word units can operate at high speeds, logical AND and logical OR operations of bit units require much longer operating times.
(2) It is impossible to efficiently store the results of a plurality of logical operations of a bit unit and utilize stored information.
(3) As is described in an article entitled "A 16-Bit LSI Minicomputer" in IEEE JOURNAL OF SOLID-STATE CIRCUITS, Vol. SC-11, No. 5, October 1976, in microprocessors, such as TOSBAC-40L, one word of an instruction word has 8 bits which are used for an operation code, and two sets of 4 bits which are respectively used for register designation and index designation. Even if an attempt is made to realize sequence instructions such as those shown in Table 2 of the present disclosure as one word, "A 1", for instance, has "A" which is an operation code and requires 8 bits as well as "1" which is an operand and requires more than 8 bits (256), cannot be done; that is, "A 1" cannot be accommodated in one word. Moreover, in ordinary instructions, the latter half (8 bits) of the initial instruction word (16 bits) is invariably used for register designation and index designation. Accordingly, if sequence instructions are added to a system of instruction words which an ordinary microcomputer has, two words will be necessary as in the above-mentioned article "A 16-Bit LSI Minicomputer". To reduce the occupied space of the memory, it is desired to compose sequence instructions of a single word.